package com.olap.starter.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.olap.starter.pojo.TableMain;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author WBG
 * @since 2022-08-31
 */

public interface TableMainMapper extends BaseMapper<TableMain> {

    @Select("SELECT MAX(VERSION) FROM TABLE_MAIN WHERE UUID = #{uuid}")
    Integer getMaxVersionByUuid(@Param("uuid") long uuid);

    @Select("SELECT THEME FROM TABLE_MAIN WHERE UUID = #{uuid} AND DELETED = '0'")
    int getThemeByUuid(@Param("uuid")long uuid);
}
